package me.zk.practice1;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;

/**
 * @Author: zhang kai
 * @Date: 2022/09/20
 * @Description:
 */
public class Test {

    public static void main(String[] args) {
//        ExecutorService executor = Executors.newFixedThreadPool(5);
//        CompletableFuture<String> cf1 = CompletableFuture.supplyAsync(() -> {
//            System.out.println("执行step 1");
//            return "step1 result";
//        }, executor);
//        CompletableFuture<String> cf2 = CompletableFuture.supplyAsync(() -> {
//            System.out.println("执行step 2");
//            return "step2 result";
//        });
//        cf1.thenCombine(cf2, (result1, result2) -> {
//            System.out.println(result1 + " , " + result2);
//            System.out.println("执行step 3");
//            return "step3 result";
//        }).thenAccept(result3 -> System.out.println(result3));
//
//        System.out.println(3 << 29);

        Long a = 10000L;

        Long b = 10000L;
        System.out.println(a .equals( b));
        System.out.println(a.toString());
    }
    public static void swap(Student x, Student y) {
        Student temp = x;
        x = y;
        y = temp;
        System.out.println(x.getName());
        System.out.println(y.getName());


    }
}

@AllArgsConstructor
@Data
class Student {
    String name;
}
